﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Oracle.DataAccess.Client;
using MySql.Data.MySqlClient;
using System.Data.SQLite;
using System.Data.OleDb;
using System.Data.SqlClient;

namespace Cn.Edwon.Data {
    public class ADOUtil {

        public class Tester{

            public static String Oracle(String rConnString) {
                using (OracleConnection conn = new OracleConnection(rConnString)) {
                    try {
                        conn.Open();
                    } catch (Exception ex) {
                        return ex.Message;
                    }
                }
                return "";
            }
            public static String MySql(String rConnString) {
                using (MySqlConnection conn = new MySqlConnection(rConnString)) {
                    try {
                        conn.Open();
                    } catch (Exception ex) {
                        return ex.Message;
                    }
                }
                return "";
            }
            public static String SQLite(String rConnString) {
                using (SQLiteConnection conn = new SQLiteConnection(rConnString)) {
                    try {
                        conn.Open();
                    } catch (Exception ex) {
                        return ex.Message;
                    }
                }
                return "";
            }
            public static String Access(String rConnString) {
                using (OleDbConnection conn = new OleDbConnection(rConnString)) {
                    try {
                        conn.Open();
                    } catch (Exception ex) {
                        return ex.Message;
                    }
                }
                return "";
            }
            public static String SQLServer(String rConnString) {
                using (SqlConnection conn = new SqlConnection(rConnString)) {
                    try {
                        conn.Open();
                    } catch (Exception ex) {
                        return ex.Message;
                    }
                }
                return "";
            }
        }
    }
}
